﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace WineStore.Models
{
    public class Product
    {
        public int ProductId { get; set; }

        [Required(ErrorMessage = "Required !")]
        public string ProductName_EN { get; set; }

        [Required(ErrorMessage = "Required !")]
        public string ProductName_GER { get; set; }

        [DisplayFormat(DataFormatString = "{0:0}", ApplyFormatInEditMode = true)]
        public decimal ProductPrice { get; set; }

        [Required(ErrorMessage = "Required !")]
        public string ProductImage { get; set; }

        [Required(ErrorMessage = "Required !")]
        public int CategoryId { get; set; }

        public virtual Category Category { get; set; }

        public List<OrderDetail> OrderDetails { get; set; }
    }
}